package com.lglbc;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author 乐哥聊编程
 * @Doc 关注公众号"乐哥聊编程"获取文档和源码
 * @Date 2023/6/17
 * @Description
 */
@FeignClient(name = "service3",fallback = Service3FeignFallback.class)
public interface Service3Feign {
    @GetMapping("/service3")
    public String service3(@RequestParam("name") String name);
}
@Component
class Service3FeignFallback implements Service3Feign{

    @Override
    public String service3(String name) {
        return "service3 调用失败";
    }
}